Skip to content

feat(dashboard): surface verdict_source + per-run triggered_by badge#4263

Open
EmmaLouise2018 wants to merge 1 commit intoclaude/issue-4247-owner-test-canonical-writefrom
EmmaLouise2018/unification-pr2-dashboard-triggered-by
Open

feat(dashboard): surface verdict_source + per-run triggered_by badge#4263
EmmaLouise2018 wants to merge 1 commit intoclaude/issue-4247-owner-test-canonical-writefrom
EmmaLouise2018/unification-pr2-dashboard-triggered-by

Conversation

@EmmaLouise2018
Copy link
Copy Markdown
Contributor

PR 2 of the #4247 unification stack. Stacked on #4250.

Summary

PR #4250 added verdict_source to /api/registry/agents/:url/compliance and triggered_by to each row returned by /api/registry/agents/:url/compliance/history. The dashboard wasn't rendering either. This PR surfaces both so operators can distinguish their own on-demand runs from scheduled heartbeat verdicts at a glance.

Why

Brian's review on #4250 (and the #4247 plan): the public compliance contract is shifting from "last scheduled verdict" to "last verdict from any source." Telling the caller — including the operator viewing their own dashboard — that the current verdict is from your test vs heartbeat is the load-bearing UX clarification. Without it, an operator runs evaluate_agent_quality, sees the dashboard tile flip to passing, and has no signal that the public registry now reflects their on-demand run rather than the cron's verdict.

What changes

  • Compliance tile: appends (your test) / (heartbeat) / (manual) / (webhook) after Last checked: 3m ago. Empty string when verdict_source is null (never run).
  • History panel: per-run badge with the same source label. Info-blue for triggered_by = 'owner_test'; neutral for heartbeat / manual / webhook so pre-PR-1 rows render without regression.

No backend changes. Pure UI on fields the API already emits.

Stacked on

This PR's diff is read against #4250's branch. Merge order: #4250 → this PR.

Out of scope (later PRs in the #4247 stack)

  • PR 3 — drop agent_test_history, backfill owner-triggered rows into agent_compliance_runs, S3-export third-party rows. Destructive migration; soaks behind PR 2.
  • PR 4 — collapse agent_contexts.last_test_* columns into a derived view. Pure schema cleanup.

Test plan

  • tsc --noEmit -p server/tsconfig.json clean
  • Build passes
  • Manual smoke after deploy: register agent, run evaluate_agent_quality, observe dashboard compliance tile shows (your test). Wait for next heartbeat, observe it flips to (heartbeat).
  • Manual smoke: open History panel, observe owner-triggered runs render with blue Your test badge, heartbeat runs render with neutral badge.
  • Pre-PR-1 rows (no triggered_by value, or only 'heartbeat') render cleanly without empty/garbage labels.

@bokelley
Copy link
Copy Markdown
Contributor

bokelley commented May 9, 2026

Code review (expert pass): clean. Will cascade after #4250 strips its committed dist/ files and #4264 fixes the dual-write-window dup-guard.

@EmmaLouise2018 EmmaLouise2018 force-pushed the claude/issue-4247-owner-test-canonical-write branch from c71809a to 42e7f37 Compare May 9, 2026 00:09
PR 2 of the #4247 unification stack. Reads two fields PR #4250 added
to the compliance API but the dashboard wasn't yet rendering:

- compliance tile: appends "(your test)" / "(heartbeat)" / "(manual)"
  / "(webhook)" after Last checked, so operators see whether the
  current verdict came from their own evaluate_agent_quality run or
  the scheduled heartbeat.
- history panel: per-run badge with the same source label, info-blue
  for owner_test and neutral for the rest. Pre-PR-1 rows render with
  neutral — no regression.

No backend changes; pure UI surfacing of fields already in the API.
Stacked on PR #4250.
@EmmaLouise2018 EmmaLouise2018 force-pushed the EmmaLouise2018/unification-pr2-dashboard-triggered-by branch from 47b26d4 to fd7d406 Compare May 9, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants